.class public Lcom/instagram/android/creation/widget/RotationGestureController;
.super Ljava/lang/Object;
.source "RotationGestureController.java"


# instance fields
.field private a:Lcom/instagram/android/creation/widget/RotationGestureController$Vector;

.field private b:Lcom/instagram/android/creation/widget/g;

.field private c:Z


# direct methods
.method public constructor <init>(Lcom/instagram/android/creation/widget/g;)V
    .locals 0
    .parameter "listener"

    .prologue
    .line 16
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 17
    iput-object p1, p0, Lcom/instagram/android/creation/widget/RotationGestureController;->b:Lcom/instagram/android/creation/widget/g;

    .line 18
    return-void
.end method

.method public static a(Landroid/graphics/PointF;Landroid/graphics/PointF;)Lcom/instagram/android/creation/widget/RotationGestureController$Vector;
    .locals 4
    .parameter
    .parameter

    .prologue
    .line 118
    new-instance v0, Lcom/instagram/android/creation/widget/RotationGestureController$Vector;

    iget v1, p0, Landroid/graphics/PointF;->x:F

    iget v2, p1, Landroid/graphics/PointF;->x:F

    sub-float/2addr v1, v2

    iget v2, p0, Landroid/graphics/PointF;->y:F

    iget v3, p1, Landroid/graphics/PointF;->y:F

    sub-float/2addr v2, v3

    invoke-direct {v0, v1, v2}, Lcom/instagram/android/creation/widget/RotationGestureController$Vector;-><init>(FF)V

    return-object v0
.end method


# virtual methods
.method public a(Landroid/view/MotionEvent;Landroid/view/View;)Z
    .locals 6
    .parameter
    .parameter

    .prologue
    const/high16 v5, 0x4000

    .line 38
    new-instance v0, Landroid/graphics/PointF;

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v1

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v2

    invoke-direct {v0, v1, v2}, Landroid/graphics/PointF;-><init>(FF)V

    .line 41
    new-instance v1, Landroid/graphics/PointF;

    invoke-virtual {p2}, Landroid/view/View;->getLeft()I

    move-result v2

    invoke-virtual {p2}, Landroid/view/View;->getRight()I

    move-result v3

    add-int/2addr v2, v3

    int-to-float v2, v2

    div-float/2addr v2, v5

    invoke-virtual {p2}, Landroid/view/View;->getBottom()I

    move-result v3

    invoke-virtual {p2}, Landroid/view/View;->getTop()I

    move-result v4

    add-int/2addr v3, v4

    int-to-float v3, v3

    div-float/2addr v3, v5

    invoke-direct {v1, v2, v3}, Landroid/graphics/PointF;-><init>(FF)V

    .line 44
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v2

    packed-switch v2, :pswitch_data_0

    .line 69
    :cond_0
    :goto_0
    iget-boolean v0, p0, Lcom/instagram/android/creation/widget/RotationGestureController;->c:Z

    return v0

    .line 46
    :pswitch_0
    invoke-static {v0, v1}, Lcom/instagram/android/creation/widget/RotationGestureController;->a(Landroid/graphics/PointF;Landroid/graphics/PointF;)Lcom/instagram/android/creation/widget/RotationGestureController$Vector;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/android/creation/widget/RotationGestureController;->a:Lcom/instagram/android/creation/widget/RotationGestureController$Vector;

    .line 47
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/instagram/android/creation/widget/RotationGestureController;->c:Z

    goto :goto_0

    .line 52
    :pswitch_1
    iget-object v2, p0, Lcom/instagram/android/creation/widget/RotationGestureController;->a:Lcom/instagram/android/creation/widget/RotationGestureController$Vector;

    if-eqz v2, :cond_0

    .line 56
    invoke-static {v0, v1}, Lcom/instagram/android/creation/widget/RotationGestureController;->a(Landroid/graphics/PointF;Landroid/graphics/PointF;)Lcom/instagram/android/creation/widget/RotationGestureController$Vector;

    move-result-object v0

    .line 57
    iget-object v1, p0, Lcom/instagram/android/creation/widget/RotationGestureController;->a:Lcom/instagram/android/creation/widget/RotationGestureController$Vector;

    invoke-static {v1, v0}, Lcom/instagram/android/creation/widget/RotationGestureController$Vector;->a(Lcom/instagram/android/creation/widget/RotationGestureController$Vector;Lcom/instagram/android/creation/widget/RotationGestureController$Vector;)D

    move-result-wide v1

    .line 58
    iget-object v3, p0, Lcom/instagram/android/creation/widget/RotationGestureController;->b:Lcom/instagram/android/creation/widget/g;

    invoke-interface {v3, v1, v2}, Lcom/instagram/android/creation/widget/g;->a(D)V

    .line 59
    iput-object v0, p0, Lcom/instagram/android/creation/widget/RotationGestureController;->a:Lcom/instagram/android/creation/widget/RotationGestureController$Vector;

    goto :goto_0

    .line 63
    :pswitch_2
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/instagram/android/creation/widget/RotationGestureController;->c:Z

    .line 64
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/instagram/android/creation/widget/RotationGestureController;->a:Lcom/instagram/android/creation/widget/RotationGestureController$Vector;

    goto :goto_0

    .line 44
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_2
        :pswitch_1
    .end packed-switch
.end method
